package com.epoint.spring.config;

import com.epoint.spring.beantest.Epoint;
import com.epoint.spring.beantest.MyBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableConfigurationProperties({MyBean.class})
@Configuration(proxyBeanMethods = true)
public class MyConfig {

    @Bean
    public Epoint epoint(){
        Epoint epoint = new Epoint();
        epoint.setName("新点软件");
        return epoint;
    }

//    @Bean
//    public MyBean myBean(Epoint epoint){
//        MyBean myBean = new MyBean();
//        myBean.setName("纪宽豪");
//        myBean.setAge(27);
//        myBean.setEpoint(epoint);
//        return myBean;
//    }

}
